/*
 * License: Copyright (c) Huawei Technologies Co., Ltd. 2012-2019. All rights reserved.
 * Description: 错误码定义
 * Date: 2019-02-28
 * LastEditTime: 2019-09-23 16:16:10
 */
#ifndef ERROR_CODE_H_
#define ERROR_CODE_H_

#include "hiaiengine/status.h"

#define MODID_CLASSIFY_NET 0x5001
enum {
    HIAI_CREATE_DVPP_ERROR_CODE = 0,
    HIAI_JPEGD_CTL_ERROR_CODE,
    HIAI_PNGD_CTL_ERROR_CODE,
    HIAI_JPEGE_CTL_ERROR_CODE,
    HIAI_VDEC_CTL_ERROR_CODE,
    HIAI_VENC_CTL_ERROR_CODE,
    HIAI_INVALID_INPUT_MSG_CODE,
    HIAI_AI_MODEL_MANAGER_INIT_FAIL_CODE,
    HIAI_AI_MODEL_MANAGER_PROCESS_FAIL_CODE,
    HIAI_SEND_DATA_FAIL_CODE,

    HIAI_AI_MODEL_CREATE_OUTPUT_FAIL_CODE,
    HIAI_AI_MODEL_WRONG_OUTPUT_SIZE_CODE,
    HIAI_ARG_NUMBER_NOK_CODE
};
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_CREATE_DVPP_ERROR, "create dvpp error");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_JPEGD_CTL_ERROR, "jpegd ctl error");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_PNGD_CTL_ERROR, "pngd ctl error");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_JPEGE_CTL_ERROR, "jpege ctl error");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_VDEC_CTL_ERROR, "vdec ctl error");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_VENC_CTL_ERROR, "venc ctl error");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_INVALID_INPUT_MSG, "invalid input message");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_AI_MODEL_MANAGER_INIT_FAIL, "ai model manager init failed");
HIAI_DEF_ERROR_CODE(
    MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_AI_MODEL_MANAGER_PROCESS_FAIL, "ai model manager process failed");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_SEND_DATA_FAIL, "send data failed");
HIAI_DEF_ERROR_CODE(MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_AI_MODEL_CREATE_OUTPUT_FAIL, "Failed to create output tensor");
HIAI_DEF_ERROR_CODE(
    MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_AI_MODEL_WRONG_OUTPUT_SIZE, "Classify net rcnn output size is wrong");
HIAI_DEF_ERROR_CODE(
    MODID_CLASSIFY_NET, HIAI_ERROR, HIAI_ARG_NUMBER_NOK, "Arg number is not right, example: classify_net_main vgg16");

/* define error */
#define USE_DEFINE_ERROR 0x6001

enum { HIAI_IDE_ERROR_CODE, HIAI_IDE_INFO_CODE, HIAI_IDE_WARNING_CODE };

HIAI_DEF_ERROR_CODE(USE_DEFINE_ERROR, HIAI_ERROR, HIAI_IDE_ERROR, "");
HIAI_DEF_ERROR_CODE(USE_DEFINE_ERROR, HIAI_INFO, HIAI_IDE_INFO, "");
HIAI_DEF_ERROR_CODE(USE_DEFINE_ERROR, HIAI_WARNING, HIAI_IDE_WARNING, "");

#endif  // ERROR_CODE_H_
